const mongoose = require('mongoose');
const uri = 'mongodb+srv://2359647500:IqLqDFKyx0vH4UDj@brother.1z7ds.mongodb.net/Data?retryWrites=true&w=majority';

mongoose.connect(uri, { useNewUrlParser: true, useUnifiedTopology: true })
  .then(() => {
    console.log('连接成功');
  })
  .catch((err) => {
    console.log(err, "---连接失败---")
  })


const UserSchema = new mongoose.Schema({
  user:String,
  password:String,
  phone:String
})
 
const UserModule = mongoose.model('peopleUser',UserSchema, 'peopleUser')


module.exports = {
 UserModule
}